'use strict'

module.exports = {
  RequestLogin: {
    open_id: { type: 'string', required: false, description: '用户open_id', example: 'x121s561e51sd5f165d' },
    nick_name: { type: 'string', required: false, description: '用户昵称', example: '守法公民' },
    avatar_url: { type: 'string', required: false, description: '用户昵称', example: 'https://img.xxx.xxxx./dij3.jpg' },
    phone: { type: 'string', required: true, description: '用户手机号码', example: '13812345678' },
    gender: { type: 'number', required: false, description: '用户性别', example: 1 },
    province: { type: 'string', required: false, description: '用户所在省份', example: '北京' },
    city: { type: 'string', required: false, description: '用户所在城市', example: '北京' },
    language: { type: 'string', required: false, description: '用户使用语言', example: 'zh_CN' }
  },
  // 微信登录
  RequestWXLogin: {
    code: { type: 'string', required: true, description: '授权用户信息获取到的临时凭证', example: '165wef654r564165df1e6r6d' }
  },
  // 获取手机号
  RequestPhone: {
    code: { type: 'string', required: true, description: '授权手机号获取到的临时凭证', example: '165wef654r564165df1e6r6d' },
    open_id: { type: 'string', required: true, description: '当前微信用户open_id', example: 'x121s561e51sd5f165d' }
  },

  // 账号密码登录参数
  UserLogin: {
    account: { type: 'string', required: true, description: '用户名', example: '13758569542' },
    password: { type: 'string', required: true, description: '密码MD5', example: '123456' }
  },

  UserCreate: {
    account: { type: 'string', required: true, description: '用户名', example: '13758569542' },
    password: { type: 'string', required: true, description: '密码MD5', example: '123456' },
    is_root: { type: 'number', required: false, description: '是否超管', example: 0 },
    status: { type: 'number', required: false, description: '状态', example: 1 }
  },

  UserEdit: {
    id: { type: 'number', required: true, description: '用户ID', example: 86 },
    password: { type: 'string', required: false, description: '密码MD5', example: 'new75894' },
    nick_name: { type: 'string', required: false, description: '用户昵称', example: '法外狂徒' },
    avatar_url: { type: 'string', required: false, description: '用户昵称', example: 'http://img.xxx.com/fff.png' },
    gender: { type: 'number', required: false, description: '用户性别', example: 1 },
    province: { type: 'string', required: false, description: '用户所在省份', example: '北京' },
    city: { type: 'string', required: false, description: '用户所在城市', example: '北京' },
    language: { type: 'string', required: false, description: '用户使用语言', example: 'zh_CN' },
    is_root: { type: 'number', required: false, description: '是否超管', example: 0 },
    status: { type: 'number', required: false, description: '状态', example: 1 }
  },

  UserEditPwd: {
    id: { type: 'number', required: true, description: '用户ID', example: 86 },
    password: { type: 'string', required: true, description: '密码MD5', example: 'old75894' },
    new_password: { type: 'string', required: true, description: '新密码MD5', example: 'new75894' }
  },

  UserDelete: {
    id: { type: 'number', required: true, description: '用户ID', example: 86 }
  },

  UserList: {
    account: { type: 'string', required: false, description: '账号（手机号）', example: '13685957546' },
    pageIndex: { type: 'number', required: false, description: '页码', example: 1 },
    pageSize: { type: 'number', required: false, description: '每页数量', example: 10 }
  }

}
